﻿using System.Collections.Generic;
using System.ServiceModel;
using VideoStore.Services.Dto;
using VideoStore.Common.Response;

namespace VideoStore.Services.Interface
{
    [ServiceContract(Namespace = "VideoStore.Services.CatalogueService")]
    public interface ICatalogueService
    {
        /// <summary>
        /// Creates the video.
        /// </summary>
        /// <param name="newVideo">The new video.</param>
        /// <returns></returns>
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Response<CatalogueDto> CreateVideo(CatalogueDto newVideo);

        /// <summary>
        /// Gets the video by id.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns></returns>
        [OperationContract]
        Response<CatalogueDto> GetVideoById(int id);

        /// <summary>
        /// Gets the video by catalogue number.
        /// </summary>
        /// <param name="catalogueNumber">The catalogue number.</param>
        /// <returns></returns>
        [OperationContract]
        Response<CatalogueDto> GetVideoByCatalogueNumber(string catalogueNumber);

        /// <summary>
        /// Gets the videos by director.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns></returns>
        [OperationContract]
        Response<List<CatalogueDto>> GetVideosByDirector(string name);

        /// <summary>
        /// Gets the video by genre.
        /// </summary>
        /// <param name="genreName">Name of the genre.</param>
        /// <returns></returns>
        [OperationContract]
        Response<List<CatalogueDto>> GetVideosByGenre(string genreName);
    }
}